{% block group_item %}
  <section class="group-list module module-narrow module-shallow">
    {% block group_item_header %}
      <header class="module-heading">
        {% set truncate=truncate or 0 %}
        {% set truncate_title = truncate_title or 0 %}
        {% set title = group.title or group.name %}
        {% block group_item_header_image %}
          <a class="module-image" href="{{ h.url_for(group.type ~ '.read', id=group.name) }}">
            <img src="{{ group.image_display_url or h.url_for_static('/base/images/placeholder-group.png') }}" alt="{{ group.name }}" />
          </a>
        {% endblock %}
        {% block group_item_header_title %}
          <h3 class="media-heading"><a href="{{ h.url_for(group.type ~ '.read', id=group.name) }}">{{ group.title or group.name }}</a></h3>
        {% endblock %}
        {% block group_item_header_description %}
          {% if group.description %}
            {% if truncate == 0 %}
              <p>{{ h.markdown_extract(group.description)|urlize }}</p>
            {% else %}
              <p>{{ h.markdown_extract(group.description, truncate)|urlize }}</p>
            {% endif %}
          {% endif %}
        {% endblock %}
      </header>
    {% endblock %}
    {% block group_item_content %}
      {% set list_class = "list-unstyled dataset-list" %}
      {% set item_class = "dataset-item module-content" %}
      {% snippet 'snippets/package_list.html', packages=group.packages, list_class=list_class, item_class=item_class, truncate=120 %}
    {% endblock %}
  </section>
{% endblock %}
